<template>
  <div id="Header">
    <mt-header :title="header" fixed class="hcon">
      <mt-button icon="" slot="left" class="iconfont icon-sousuo" @click="onSearch"></mt-button>
      <mt-button icon="" slot="right" class="iconfont icon-fabu" @click="ToSend"></mt-button>
    </mt-header>
  </div>
</template>
<script>
  import MemberCenterProvider from "@/providers/MemberCenterProvider";
   import { Toast } from 'mint-ui';
export default {
    name:'Header',
    props: {
        header: String,
    },
    data(){
        return{
           
        }
    },
    methods:{
        onSearch(){
            this.$router.push('/search');
        },
        ToSend(){
            MemberCenterProvider.checkStuReq().then(result=>{
                    
                if(result.data=='未认证'){
                    Toast('请先学生认证才能发布')
                    this.$router.push('/renzheng')
                }else{
                    this.$router.push('/fabu')
                }
            })
        }
    }
}
</script>
<style scoped>

</style>